NetworkBoundImageFactory

An ImageFactory whose bytes may come from a local cache OR the network. The render resource cache decodes it in two phases: createCachedImage on the local-retrieval lane (cache-only, null on a miss) then createImage on the remote lane only on a miss — keeping slow network fetches off the lane shared with placemark icons and cache-hit tiles.

Properties

Link copied to clipboard

Image factory runs asynchronously by default, but this behavior can be changed by overriding current attribute.

Functions

Link copied to clipboard
abstract suspend fun createCachedImage(): BufferedImage?

Cache-only decode; returns null on a local miss WITHOUT touching the network.

Link copied to clipboard
abstract suspend fun createImage(): BufferedImage?

Returns the image associated with this factory. This method may be called more than once and may be called from a non-UI thread. Each invocation must return an image with equivalent content, dimensions and configuration. Any side effects applied to the WorldWind scene by the factory must be executed on the main thread.